package com.komorebi.friends.once;

import com.alibaba.excel.EasyExcel;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class ImportExcel {
    public static void main(String[] args) {
        String fileName = "D:\\yupiProject\\friends\\friends-backend\\src\\main\\resources\\output.xlsx";
        List<UserInfo> userInfos = EasyExcel.read(fileName, UserInfo.class, new ExcelTableListener()).sheet().doReadSync();
        //去重
        Set<UserInfo> userInfoSet = new HashSet<>(userInfos);
        List<UserInfo> userInfosUnique = new ArrayList<>(userInfoSet);
        System.out.println(userInfosUnique);
    }
}
